/**
 * Created by kaibb on 15-12-26.
 */

$(function () {
    var md=editormd("content_ed", {
        height: "740",

        syncScrolling: "single",
        path: "/plugin/editor/lib/",
        imageUpload: true,
        imageUploadURL: "/upload/editormd-image-file",
        flowChart: true,
        sequenceDiagram: true,
        toolbarAutoFixed: true,
        onchange:function(){
            console.log(this);
        }
    });

    $("#createPost").click(function(){
       $("#excerpt").val(md.previewContainer[0].innerHTML);
    })

    $("#getLocation").click(function () {
        Bingo.getInstance().getLocation();
    });
    if ($("#id").val().length > 0) {
        alert("保存文章成功!");
    }

})